package main
 
import (
    "bufio"
    "fmt"
    "os"
    "strings"
)
 
func main() {
    filename := "auth.log"
    f, err := os.Open(filename)
    if err != nil {
        fmt.Println("Error opening file:", err)
        return
    }
 
    defer f.Close()
 
    scanner := bufio.NewScanner(f)
 
    for scanner.Scan() {
        line := scanner.Text()
        if strings.Contains(line, "Failed password") {
            fmt.Println(line)
        }
    }
 
    if err := scanner.Err(); err != nil {
        fmt.Println("Error scanning file:", err)
        return
    }
}
